﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using IHISCETeim.BLL;
using IHISCETeim.Library;
using IHISCETeim.Model;
using System.Data;
using System.Text;
namespace IHISCETeim.Web.MachineSys.FTradeModel
{
    public partial class FTradeReceivablesTuiJi : PageBase
    {
        protected override string DWZRef
        {
            get
            {
                return "FTradeReceivablesListEasyUI";
            }
        }

        protected override Permission[] PowerKey
        {
            get
            {
                return new Permission[] { Permission.应收帐款_操作 };
            }
        }

    

        protected int FTradeID
        {
            get
            {

                return GetRequestValue<int>("FTradeID", 0);
            }
        }

        private FTradeReceivablesInfo _objFx = null;

        protected FTradeReceivablesInfo obj
        {
            get
            {
                if (_objFx == null)
                    _objFx = FTradeReceivablesController.GetByFTradeID(FTradeID);
                return _objFx;
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (GetRequestValue<string>("ajaxmethod", "") == "add")
            {
                addmenu();
                
            }           
        }
        

        private void addmenu()
        {
            

            //FTradeReceivablesInfo objNewFu = Request.SerializableObject<FTradeReceivablesInfo>();

            //int NewFCatheringId = FTradeReceivablesController.AddTuiJi(objNewFu);

            //// AddLog(Permission.修改, obj, objTrade);
            //if (NewFCatheringId > 0)
            //{
            //    string msg = "已退机成功,进入冲帐界面...";
            //    string tabTitle = "冲帐";
            //    string taburl = "FTradeModel/FTradeBalanceAdd.aspx?FCatheringId=" + NewFCatheringId.ToString();
            //    string tabrelId = "FTradeBalanceAdd";
            //    SuccessOpenNavTab(msg, tabTitle, taburl, tabrelId);
            //}
            //if (NewFCatheringId == 0)
            //{
            //    SuccessJson("已退机成功", this.DWZRef);
            //}
            //if (NewFCatheringId < 0)
            //{
            //    ErrorJson("退机失败");
            //}
            //
           
        }
    }
}